     //错误提示
    var error_message = function (content){
        $(".e_verify").show();
        $("#error").text(content);
    }
 
    //不显示错误提示
    var ok_message = function (){
        $(".e_verify").toggle(false);
    }
    //判断值是否为空
    var isEmpty = function  (value){
        if(value == "" || value == null || typeof(value) == "undefined"){
            return true;
        }else{
            return false;
        }
    }
    //验证密码
    var  check_password = function (name,names){
        //var sid = 0;
        //密码验证
        $("#"+name).focus(function(){
            $("#"+name).attr("placeholder","6-16个字符，不支持中文");
            $(".tips_txt").hide();
        }).blur(function(){  
           if(($(this).val().length)>=6 && ($(this).val().length)<=16){
        	   if($(this).val() != $('#'+names).val()){
               		error_message("两次输入密码不一致");
               }else{
            	   ok_message();
               } 
            }else if($(this).val().length==0){
                error_message("请输入密码");        
            }else if(($(this).val().length)<6&&($(this).val().length)>0){
                error_message("密码太短了，最少6个字符");  
            }else if(($(this).val().length)>16){
                error_message("密码太长了，最多16个字符");
            }else{
                ok_message();
            }
        });
        //重新输入密码验证
        $("#"+names).focus(function(){
            $("#"+names).attr("placeholder","再次输入密码");
        }).blur(function(){ 
            if($(this).val().replace(/[^\u0000-\u00ff]/g,"aa").length<6){
                error_message("密码太短了，最少6个字符"); 
            }else if($(this).val()==$("#"+name).val()){ 
                ok_message();
                $("#button").attr('sid',1);
            }else{ 
                error_message("两次输入的密码不一致");
            }
        });
    }

    //验证手机号码正确性
    var check_mobile = function (mobile){ 
        var reg = /^1\d{10}$/;
        if(reg.test(mobile)){
            return true;
        }else{
            return false;
        }
    }

    var get_pro_city_option = function (id,act){
        $("#"+id).change(function(){  
            var id = $(this).val(); 
            $.ajax({
                type: 'POST',
                url: ' /myjuooo/ajax/get_city_data',
                data: { pro: id,act:act },
                dataType: 'json',
                error:function(){
                    alert("网络异常，请稍后");
                },
                beforeSend:function(){
                    //$("#delete_butoon").html('删除中...'); 
                },
                success: function(json){
                    if(json.ok){
                        $("#"+act).html(" ");
                        $("#"+act).html(json.msg);
                    }
                },
                complete:function(){
                  //$("#delete_butoon").html('删除');                      
                }
            })
        })
    } 
    //验证邮箱
    var _checkEamil = function(email){
        var EamilReg = /.+@.+\.[a-zA-Z]{2,4}$/;
        if(EamilReg.test(email)){
            return true;
        } else {
            return false;
        }

    }
    //验证手机号
    var _checkMobile = function(mobile){
        var MoblieReg = /^1\d{10}$/;
        if(MoblieReg.test(mobile)){
            return true;
        } else {
            return false;
        }
    }
    //验证用户名
    var _checkUserName = function(username){
        
        if(_checkEamil(username) || _checkMobile(username)){
            return true;
        } else {
            return false;
        }
        

    }
    var _tips = function(tips){
        $(".e_verify").html('<span class="icon-warn"></span>'+tips+'');
    }

    var _animate = function(obj){
        $(obj).parent().stop().animate({ left: "-10px" }, 100).animate({ left: "10px" }, 100).animate({ left: "-10px" }, 100).animate({ left: "10px" }, 100).animate({ left: "0px" }, 100);
    }

    //显示提示信息框
    var show_message = function(content){
        layer.open({
            content: content,
            time: 2
        });
    }

    //显示选择框,在跳转页面
    var click_layer_location = function (url,content){
        if(isEmpty(url)){
            var url = "/";
        }
        layer.open({
            content: content,
            btn: ['OK']
        });
        $('.layermbtn').children("span").click(function(){
            window.location.href = url;
        })  
    }

    //无查找记录显示
    var no_show_list = function(){
        var html = '<section class="ui-notice ui-notice-news"><i class="juo-notice not-woDeXiaoXi"></i><p>很遗憾，暂无内容！</p></section>';
        return html;
    }

    var isNumeric = function(str){
        var Numericstr = /[0-9]*/;
        if(Numericstr.test(str)){
            return true;
        } else {
            return false;
        }

    } 

    //跳转搜索页
    var JuoooSearching = function(){
        var keyword = $("#keyword").val();
        if(!isEmpty(keyword)){
            window.location.href="/search?in=1&k="+keyword;
        }
        
    }

    //编辑订单
    var Juooo_editOrder = function (order_id){
        
           layer.open({
            content: '你确定取消此订单？',
            btn: ['确认', '取消'],
            shadeClose: false,
            yes: function(){

                    $.ajax({
                        type:'post',
                        url:'/myjuooo/editOrder/',
                        data:'order_id='+order_id,
                        dataType:'json',
                        async:false,
                        error:function(){
                            show_message("系统繁忙，请稍后再试！");
                        },
                        success:function(data){
                            // alert(data);
                            if(data.status==1){
                                //alert(data.msg);
                                window.location.reload();
                            } else {
                                // $("#orderPopCon .tip").html('<s class="icon_error"></s>'+data.msg+'');
                                return false;
                            }
                        }
                    })
            }
        });

    }

    //删除订单
    var Juooo_delorder = function (order_id,flag){
        layer.open({
            content: '你确定删除此订单？',
            btn: ['确认', '取消'],
            shadeClose: false,
            yes: function(){
                $.ajax({
                    type:'post',
                    url:'/myjuooo/delOrder/',
                    data:'order_id='+order_id,
                    dataType:'json',
                    async:false,
                    error:function(){
                        show_message("系统繁忙，请稍后再试！");
                    },
                    success:function(data){
                        if(data.status==1){
                            if(flag==1){
                                window.location.reload();
                            } else {
                                $("#order_"+order_id).remove();
                            }
                        } else {
                            show_message(data.msg);
                            return false;
                        }
                    }
                })
            }
        });
    }
 
//内容块加载
function returnLoading(){
    var html ="";
    html = '<div class="juo-layer"><div class="juc-breaking-load"><div class="juc-i juc-w-loading"></div><div class="juc-i juc-m-logo"></div><div class="juc-m-text">努力加载中...</div></div></div>';
    return html;
}

//内容块加载  fixed
function pupLoading(){
    var html ="";
    html = '<div class="juc-load-warp"><div class="juc-breaking-load"><div class="juc-i juc-w-loading"></div><div class="juc-i juc-m-logo"></div><div class="juc-m-text">努力加载中...</div></div></div>';
    return html;
}

//暂无网络
function show_messages(){
    var html = "";
    html = '<section class="ui-notice ui-notice-404"><i class="juo-notice not-gantan"></i><p>系统繁忙，请稍后再试！</p></section>';
    return html;
}

//暂无内容
function not_available(){
    var html = "";
    html = '<section class="ui-notice ui-notice-news"><i class="juo-notice not-woDeXiaoXi"></i><p>暂无内容</p></section>';
    return html;
}

    
    
    var Juooo_payTip = function (){
        var html='<div class="g_mask"  id="orderPopCon"><div class="g_popWarp" style="margin-left:-191px">';
        html+='<div class="g_popBg g_p5 pop_loading__300">';
        html+='<div class="g_popBgFff">';
        html+='<div class="com_loading">';
        html+='<img src="http://basic.juooo.com/v3/images/common/pay-loader.gif" alt="">';
        html+='<p class="loading_txt">正在跳转支付平台，请稍后...</p>';
        html+='</div>';
        html+='</div>';
        html+='</div>';
        html+='</div></div>';
        $(document.body).append(html);
    }


    var Juooo_doneTip = function (){
        var html='<div class="g_mask"  id="orderPopCon"><div class="g_popWarp" style="margin-left:-191px">';
        html+='<div class="g_popBg g_p5 pop_bankingPay">';
        html+='<div class="g_popBgFff">';
        html+='<div class="g_popTit"><a href="javascript:" class="g_popColse" onclick="close_box()"></a><b class="pt_txt">登录网上银行付款</b></div>';
        html+='<div class="p_bkp_box">';
        html+='<h4 class="tip"><s class="icon_error"></s>请在新开网银页面完成付款后选择：</h4>';
        html+='<p>付款成功：<a href="/myjuooo/myorder">查看订单</a> 或 <a href="/">继续购物</a></p>';
        html+='<p>付款失败：<a href="/help/question3-5" target="_blank">查看帮助</a> 或 <a href="javascript:void(0)" onclick="close_box()">使用其他付款方式</a></p>';
        html+='</div>';
        html+='</div>';
        html+='</div>';
        html+='</div></div>';
        $(document.body).append(html);
    }